<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0"/>
    <title>title</title>
    <link rel="stylesheet" type="text/css" href="../css/api.css"/>
    <style>
        html, body {
           background-color: #f8f8f8; 
        }
        .main {
        	background-color: #fff;
        }
        .info_box {
        	padding: 7px 0;
        }
        .info {
        	height: 25px;
        	line-height: 25px;
			display: -webkit-box;
			display: -webkit-flex;
			padding: 0 15px;
        }
        .info .info_l {
        	color: #999;
        	font-size: 13px;
        }
        .info .info_r {
        	width: 0;
        	flex: 1;
        	-webkit-flex: 1;
        	box-flex: 1;
        	-webkit-box-flex: 1;
        	color: #333;
        	font-size: 13px;
        	text-align: right;
            display: -webkit-box;
            text-overflow: ellipsis;
            -webkit-line-clamp: 1;
            overflow: hidden;
            -webkit-box-orient: vertical;
        }
        .title {
        	height: 50px;
        	line-height: 50px;
        	border-bottom: 1px solid #e8e8e8;
        }
        .title .info_l {
			color: #333;
			font-size: 15px;
        }
        .title .info_r {
        	color: #e62442;
        	font-size: 16px;

        }
    </style>
</head>
<body>
    <div class="main">
		<div class="info title">
			<div class="info_l">提现记录</div>
			<div class="info_r">RM<span class="amount"></span></div>
		</div>
    	<div class="info_box">
			<div class="info">
				<div class="info_l">收款人</div>
				<div class="info_r"><span class="name"></span></div>
			</div>
			<div class="info">
				<div class="info_l">备注</div>
				<div class="info_r"><span class="note"></span></div>
			</div>
			<div class="info">
				<div class="info_l">当前状态</div>
				<div class="info_r">已转账</div>
			</div>
			<div class="info">
				<div class="info_l">转入账户</div>
				<div class="info_r"><span class="account"></span></div>
			</div>
			<div class="info">
				<div class="info_l">转账时间</div>
				<div class="info_r"><span class="withdraw_time"></span></div>
			</div>
    	</div>
    </div>
</body>
<script type="text/javascript" src="../script/api.js"></script>
<script type="text/javascript" src="../script/zepto.js"></script>
<script type="text/javascript" src="../script/common.js"></script>
<script type="text/javascript">
    apiready = function(){
        var id = api.pageParam.id;
        getInitData(id);
    };

    function getInitData (_id) {
        var staffData = $api.getStorage('staff_data');
        api.ajax({
            url: rootPath + '/api/staff/get_withdraw_detail',
            method: 'post',
            data: {
                values: { 
                    staff_id: staffData.id,
                    staff_token: staffData.token,
                    id: _id
                },
            }
        }, function(ret, err) {
            if(ret.status == 200){
                if(ret.data.amount){
                    $(".amount").html(ret.data.amount);
                }
                if(ret.data.name){
                    $(".name").html(ret.data.name);
                }
                if(ret.data.note){
                    $(".note").html(ret.data.note);
                }
                if(ret.data.account){
                    $(".account").html(ret.data.account.substr(0,4)+'****'+ret.data.account.substr(ret.data.account.length-2));
                }
                if(ret.data.withdraw_time){
                    $(".withdraw_time").html(ret.data.withdraw_time);
                }
            }
        });
    }






</script>
</html>







